from django.urls import path, include
from cmdb.views import dict, asset, business, label
from rest_framework import routers

router = routers.DefaultRouter()
router.register(r'dicts', dict.DictViewSet, base_name="dicts")
router.register(r'devices', asset.DeviceInfoViewSet, base_name="devices")
router.register(r'businesses', business.BusinessViewSet, base_name="businesses")
router.register(r'labels', label.LabelViewSet, base_name="labels")

urlpatterns = [
    path(r'api/', include(router.urls)),
    path(r'api/dict/tree/', dict.DictTreeView.as_view(), name='dict_tree'),
    path(r'api/device/list/', asset.DeviceListView.as_view(), name='device_list'),
]
